import request from '@/utils/request'
// // 获取图形验证码
// export const getPicCode = () => {
//   return request.get('/captcha/image', { platform: 'H5' })
// }
export const getPicCode = (code) => {
  return request.get(`/captcha/getPicCode/${encodeURIComponent(code)}`)
}

// 获取短信验证码
export const getMsgCode = (captchaCode, captchaKey, mobile) => {
  return request.post('/captcha/getMsgCode', {
    form: {
      captchaCode,
      captchaKey,
      mobile
    }
  })
}

// 登陆接口
export const codeLogin = (mobile, smsCode) => {
  return request.post('/captcha/codeLogin', {
    form: {
      smsCode,
      mobile,
      isParty: false,
      partyData: {}
    }
  })
}
